<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<!-- 接收session中的对象 -->
	<s:set name="username" value="#session['username']" />

	<!-- 导航栏中的标签 -->
	<h2>首页</h2>
	<s:a href="index">首页</s:a><br>
	<s:if test="#username != null">
		<s:a
			href="masonry?username=%{#username.username}&
	image=%{#username.image}">瀑布流</s:a>
	</s:if>
	<s:else>
		<s:a href="masonrynologin">瀑布流</s:a>
	</s:else>
	<br>
	<s:if test="#username == null">
		<s:a href="login.jsp">登录</s:a>
		<br>
		<s:a href="regist.jsp">注册</s:a>
		<br>
		
	</s:if>

	<!-- 显示session中的参数 -->
	<s:if test="#username != null">
		<s:a>
			<img
				src="${pageContext.servletContext.contextPath}/img/${username.image}"
				width="40px" height="40px">
		</s:a>
		<br>
		<s:a href="#">${username.username}</s:a>已经登录
		<s:a href="admin_user?username=%{#username.username}">个人信息</s:a>
		<br>
		<s:a href="my_order?username=%{#username.username}&image=%{#username.image}">个人歌单</s:a>
		<br>
		<s:a href="logout">注销</s:a>
		<s:a href="regist.jsp">注册</s:a>
		<br>
	</s:if>

	<!-- 搜索框 -->
	<s:form action="search" method="post" theme="simple">
		<s:textfield value="歌手/用户/歌曲/歌单" />
		<s:submit value="搜索" />
		<br>
	</s:form>
</body>
</html>